const initialState = {
    Boutiquearr:[],
    freearr:[],
    fenleidata:[]
}
let homereducer = (state = initialState, { type, payload ,payload1}) => {
 let newobj = JSON.parse(JSON.stringify(state))
  switch (type) {

  case "Boutiquelist":
    newobj.Boutiquearr = payload
    return newobj
  case "Freedatalist" :
      if (payload1) {
        newobj.freearr = [... newobj.freearr,...payload]
      } else {
        newobj.freearr = payload
      }
  case "getfenlei" :
    newobj.fenleidata = payload
      return newobj
  default:
    return state
  }
}
export default homereducer
